//
//  FSFormatTool.h
//  rui_lian_zhi_jia
//
//  Created by 代佳宏 on 2019/9/25.
//  Copyright © 2019 华宇瑞联. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface FSFormatTool : NSObject
+ (NSString *)formatPriceWithPrice:(NSNumber *)price;
//是否需要￥符号
+ (NSString *)formatPriceWithPrice:(NSNumber *)price symbol:(BOOL)symbol;
+ (NSString *)formatStockWithQuantity:(NSNumber *)quantity;
+ (NSString *)formatDateStringWithDateString:(NSString *)dateString
                             SourceFormatter:(NSDateFormatter *)formatter
                               DestFormatter:(NSDateFormatter *)formatter;
//date转字符串
+ (NSString *)formatDateTime:(NSDate *)dataTime format:(NSString *)format;
//字符串转date
+ (NSDate *)formatStrTime:(NSString *)strTime format:(NSString *)format;
//时间戳转时间格式
+ (NSString *)formatDateWithTimeString:(NSString *)timeString;
//时间戳转月日
+ (NSString *)formatDateWithTimeInterval:(NSInteger)time;
//时间戳转年月日
+ (NSString *)formatDateWithTimeIntervalYear:(NSInteger)time;
//时间戳转日期格式(根据格式样式)
+ (NSString *)formatDateStrWithTimeInterval:(NSInteger)time format:(NSDateFormatter *)format;
//时间戳转日期格式(根据时间格式格式样式)
+ (NSString *)formatDateStrWithTimeInterval:(NSInteger)time formatStr:(NSString *)formatStr;
//获取当前年月日
+ (NSString *)stringMonthFromNowDate;
//获取当前年月
+ (NSString *)stringMonthFrom;
//时间戳
+(NSString *)getNowTimeTimestamp3;

//获取wifi名
+(NSString *)getWifiNameSsid;//现在获取wifi名需要
//十六进制颜色
+ (UIColor *)colorWithHexString:(NSString *)color;
//十六进制颜色
+ (UIColor *)colorWithHexStringAL:(NSString *)color alpha:(CGFloat)alpha;
//手机号码验证
+ (BOOL)validateContactNumber:(NSString *)mobileNum;

// 存储用户偏好设置到NSUserDefults
+ (void)writeUserDataWithKey:(id)data forKey:(NSString*)key;

//读取用户偏好设置
+ (id)readUserDataWithKey:(NSString*)key;

+ (NSString *)arrayToJSONString:(NSArray *)array;//数组转jsons

+(NSString*)cronStringWithtime:(long long)time
   week:(NSInteger)week
                       weekday:(NSInteger)weekday;

//两个时间进行比较
+(NSInteger)compareDate:(NSString*)aDate withDate:(NSString*)bDate;



@end


